package com.kdzy.lshy.fluxdemo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
public class HelloController {

    /**
     * web版本
     * @return
     */
//    @GetMapping("/hello")
//    public String hello() {
//        return "Welcome to reactive world";
//    }

    @RequestMapping("/helloReactive")
    public Mono<String> helloReactive() {
        return Mono.just("Welcome to reactive world");
    }

}
